package com.zllkj.mm.api.remote;


import com.zllkj.mm.api.network.BaseListResponse;
import com.zllkj.mm.api.network.BaseResponse;
import com.zllkj.mm.api.network.subscriber.BaseString;
import com.zllkj.mm.model.entity.AddShoppingCartVo;
import com.zllkj.mm.model.entity.ShoppingCartListBean;
import com.zllkj.mm.model.entity.ShoppingCartUpdateBean;

import java.util.List;
import java.util.Map;

import retrofit2.http.Body;
import retrofit2.http.POST;
import rx.Observable;

public interface ShoppingCartApi {

    /**
     *
     * @param map
     * @return
     */
    @POST("shoppingCart/list")
    Observable<BaseResponse<List<ShoppingCartListBean>>> getShoppingCartList(@Body Map<String, Object> map);

    /**
     *
     * @param map
     * @return
     */
    @POST("shoppingCart/deleteBatch")
    Observable<BaseResponse<BaseString>> deleteShoppingCartItem(@Body Map<String, Object> map);

    /**
     *
     * @param map
     * @return
     */
    @POST("shoppingCart/updateGoodsNum")
    Observable<BaseResponse<ShoppingCartUpdateBean>> updateShoppingCartCount(@Body Map<String, Object> map);

    /**
     * this["goodsId"] = ""
     * this["goodsNum"] = 1
     * @param map
     * @return
     */
    @POST("shoppingCart/add")
    Observable<BaseResponse<AddShoppingCartVo>> addGoodsToShoppingCart(@Body Map<String, Object> map);

}
